/********************************************************************
  Copyright by TAOBAO
  File Name: common.h
  Created Date: 2009-06-03
  Author: ALI
  Version: 0.0.1
  Last Version Date:
  Version Date:
  Description: common functions
  Modified history:
  Date      Author    Description
--------------------------------------------------------------------
  20090603  ALI      common functions(create)
********************************************************************/
#ifndef __COMMON_H__
#define __COMMON_H__

#include <iostream>
#include <sstream>
#include <fstream>
#include <fstream>
#include <cassert>
#include <algorithm>

#include <vector>
#include <map>

#include <string.h>
#include <stdarg.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <glob.h>
#include <libgen.h>
#include <fnmatch.h>

using namespace std;

const int MAX_BUFF_SIZE = 10240;

typedef string::iterator	IterStr;

void Trim(string& strStr);
void LTrim(string& strStr);
void RTrim(string& strStr);

string Format(const char *fmt, ...);

int FileType(const char *pFileName );
int GetMagic(const char *pStr);

#endif // __COMMON_H__

